As an example of a fluid ejecting apparatus, an ink jet type printer has been known. This printer prints an image on a recording medium, such as a paper sheet, by causing a moving head to eject a fluid, such as ink, thereto. Furthermore, depending on the type of printer, when the printer performs a printing operation, foreign matter that adheres to various portions in the printer, such as a platen, is detected by an optical sensor or the like. Thereby, the foreign matter is prevented from interfering with the head before it happens (PTL 1).